<%@ page import ="com.easyattendance.services.LoginService" %>
<%
	LoginService login = new LoginService();
	String currentUser = (String) session.getAttribute("currentUser");
	String currentRole = login.getUserType(currentUser);
	
	if(!currentRole.equals("Teacher")) {
		request.setAttribute("unauthenticatedUser", "You are not allowed to acces this page.Please login.");
    	RequestDispatcher rd = request.getRequestDispatcher("../login.jsp");
    	rd.forward(request, response);
	}
%>